So, I have been developing my own scripts to export data from DOORS. I am trying to make the user's life easier and have Excel automatically open, like the standard Excel Export in the menu bar. However, it seems that when DXL calls Excel and opens files, it suppresses any and all prompts. Unfortunately, my VBA and ole object knowledge is limited and i am having issues figuring out how to enable these prompts. I don't want a user to run their own macros or manually make changes and then close the file and lose all of their saves just because they were expecting a "Do you want to save" prompt and didn't get one.
//Globals
OleAutoObj objExcel = oleCreateAutoObject("Excel.Application")
OleAutoObj objWrkBks=null
OleAutoObj objWrkBk=null
OleAutoObj objSheet=null
///////////////////////////////////////////////////////////////////////////////////////////
void openExcel(string fileName) {
olePut(objExcel, "Visible", true)
OleAutoObj objWrkBks = null
oleGet(objExcel, "Workbooks", objWrkBks)
OleAutoArgs args = create()
// open the report
put (args, fileName)
oleMethod (objWrkBks, "Open", args)
clear args
}
SystemAdmin - Wed Apr 04 11:35:02 EDT 2012 |
Re: Enable Save Prompt I can't reproduce the described behavior in my enviroment. (I'm prompted if I want so save the excel file, if I've made changes.) So I guess the reason for your problem is not in DXL but in the Excel files you are opening. Michael |